﻿using System.Runtime.CompilerServices;

namespace ProjectDanmaku.Util
{
    public static class BitUtility
    {
        public static readonly uint All = 4294967295;
        
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static uint EverythingExcept(params int[] bits)
        {
            uint mask = All;

            foreach (int bit in bits)
            {
                mask ^= (1u << bit);
            }

            return mask;
        }
    }
}